package com.ljx.itbbs.server.article.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljx.itbbs.server.article.domain.entity.ResourceUserRelationEntity;
import com.ljx.itbbs.server.article.mapper.ResourceUserRelationMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ResourceUserRelationDao extends ServiceImpl<ResourceUserRelationMapper, ResourceUserRelationEntity> {

    public List<ResourceUserRelationEntity> batchResourceUser(Long userId, List<Long> resIds) {
        return lambdaQuery().eq(ResourceUserRelationEntity::getUserId, userId)
                .in(ResourceUserRelationEntity::getResourceId, resIds)
                .list();
    }
}
